<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-fl">申请人修改</div>
                    <div class="widget-function am-fr">
                        <a href="javascript:;" class="am-icon-cog"></a>
                    </div>
                </div>
                <div class="widget-body am-fr">
                    <form class="am-form tpl-form-line-form" id="userInfoForm" method="post">
                        <input type="hidden" id="id" name="id" th:value="${record.id}"/>
                        <!--申请人姓名(register_name)-->
                        <div class="am-form-group">
                            <label for="registerName" class="am-u-sm-2 am-form-label">申请人姓名
                                <span class="tpl-form-line-small-title">registerName</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input type="text" id="registerName" class="tpl-form-input" placeholder="请输入"
                                       name="registerName"
                                       th:value="${record.registerName != null} ? ${record.registerName} : ''"/>
                            </div>
                        </div>
                        <!--申请单位(user_type)-->
                        <div class="am-form-group">
                            <label for="userType" class="am-u-sm-2 am-form-label">申请单位
                                <span class="tpl-form-line-small-title">userType</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input type="text" id="userType" class="tpl-form-input" placeholder="请输入"
                                       name="userType"
                                       th:value="${record.userType != null} ? ${record.registerName} : ''"/>
                            </div>
                        </div>
                        <!--申请人配偶姓名(spouse_name)-->
                        <div class="am-form-group">
                            <label for="spouseName" class="am-u-sm-2 am-form-label">申请人配偶姓名
                                <span class="tpl-form-line-small-title">spouseName</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input type="text" id="spouseName" class="tpl-form-input" placeholder="请输入"
                                       name="spouseName"
                                       th:value="${record.spouseName != null} ? ${record.spouseName} : ''"/>
                            </div>
                        </div>
                        <!--申请人配偶身份证姓名(spouse_identification)-->
                        <div class="am-form-group">
                            <label for="spouseIdentification" class="am-u-sm-2 am-form-label">申请人配偶身份证
                                <span class="tpl-form-line-small-title">spouseIdentification</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input type="text" id="spouseIdentification" class="tpl-form-input" placeholder="请输入"
                                       name="spouseIdentification"
                                       th:value="${record.spouseIdentification != null} ? ${record.spouseIdentification} : ''"/>
                            </div>
                        </div>
                        <!--申请人配偶电话号(spouse_phone)-->
                        <div class="am-form-group">
                            <label for="spousePhone" class="am-u-sm-2 am-form-label">申请人配偶电话号
                                <span class="tpl-form-line-small-title">spousePhone</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input type="text" id="spousePhone" class="tpl-form-input" placeholder="请输入"
                                       name="spousePhone"
                                       th:value="${record.spousePhone != null} ? ${record.spousePhone} : ''"/>
                            </div>
                        </div>
                        <!--申请人住址(address)-->
                        <div class="am-form-group">
                            <label for="address" class="am-u-sm-2 am-form-label">申请人住址
                                <span class="tpl-form-line-small-title">address</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input type="text" id="address" class="tpl-form-input" placeholder="请输入" name="address"
                                       th:value="${record.address != null} ? ${record.address} : ''"/>
                            </div>
                        </div>
                        <!--申请人电话(register_phone)-->
                        <div class="am-form-group">
                            <label for="registerPhone" class="am-u-sm-2 am-form-label">申请人电话
                                <span class="tpl-form-line-small-title">registerPhone</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input type="text" id="registerPhone" class="tpl-form-input" placeholder="请输入"
                                       name="registerPhone"
                                       th:value="${record.registerPhone != null} ? ${record.registerPhone} : ''"/>
                            </div>
                        </div>
                        <!--申请人身份证(identification)-->
                        <div class="am-form-group">
                            <label for="identification" class="am-u-sm-2 am-form-label">申请人身份证
                                <span class="tpl-form-line-small-title">identification</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input type="text" id="identification" class="tpl-form-input" placeholder="请输入"
                                       name="identification"
                                       th:value="${record.identification != null} ? ${record.identification} : ''"/>
                            </div>
                        </div>
                        <!--申请人密码(password)-->
                        <div class="am-form-group">
                            <label for="password" class="am-u-sm-2 am-form-label">申请人密码
                                <span class="tpl-form-line-small-title">password</span>
                            </label>
                            <div class="am-u-sm-10">
                                <input type="text" id="password" class="tpl-form-input" placeholder="请输入"
                                       name="password" th:value="${record.password != null} ? ${record.password} : ''"/>
                            </div>
                        </div>


                        <div class="am-form-group">
                            <div class="am-u-sm-10 am-u-sm-push-2">

                                <button type="button" onclick="return doSubmit();"
                                        class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交
                                </button>
                                <button type="button" onclick="loadPage('userInfo/listUI')"
                                        class="am-btn am-btn-success tpl-btn-bg-color-success ">返回
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

</div>
<script th:inline="javascript">
    <![CDATA[
    //$('select').selected();
    validateUserForm();

    function validateUserForm() {
        valdater = $('#userInfoForm').validate({
            errorElement: 'span',
            errorClass: 'am-icon-times',
            focusInvalid: true,
            onkeyup: false,
            ignore: "",
            rules: {
                title: {
                    required: true
                }
            },
            messages: {
                name: {
                    required: "请填写标题"
                }
            }
        });
    }

    function doSubmit() {
        if (valdater.form()) {
            commit('userInfoForm', 'userInfo/save', 'userInfo/listUI');
            return true;
        }
        return false;
    }

    ]]>
</script>
<script type="text/javascript" th:src="@{/My97DatePicker/WdatePicker.js}"/>